<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
 <head>
  <title>Parsing unclosed strings</title>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
  <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/parsing/core-syntax/strings/investigation/001.html"/>
  <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#parsing-errors" />
  <style type="text/css">

    /* This test caters for the following behaviours:
        1. The stylesheet is totally dropped
        2. The stylesheet is dropped from the unclosed string
        3. A newline is treated as a string terminator
        4. A newline is treated as a string terminator but the declaration then ignored
        5. Strings are treated as multiline strings
        6. Strings are treated as multiline strings and then dropped
        7. Unclosed strings and not treated as strings but streams of unknown tokens
     */

   span:before, span:after { white-space: normal; }
   .a:before { content: "PASS"; }
   .b:before { content: "DROPS ENTIRE STYLESHEET"; }
   .c:before { content: "DROPS ENTIRE STYLESHEET"; }
   .d:before { content: "DROPS ENTIRE STYLESHEET"; }
   .e:before { content: "DROPS ENTIRE STYLESHEET"; }
  </style>
  <style type="text/css">
   .b:before { content: "DOES NOT SPAN MULTIPLE LINES"; }
   .b:before { content: "SUPPORTS SPANNING
                         OVER MULTIPLE
                         LINES"; }
  </style>
  <style type="text/css">
   .c:before { content: "DOES NOT SUPPORT UNTERMINATED STRINGS AND"; }
   .c:after { content: "DROPS CONTENT AFTER THEM"; }
   .c:before { content: "TREATS NEWLINE AS STRING TERMINATOR AND
                        ; }
   .c:after { content: 'SUPPORTS CONTENT AFTER UNCLOSED STRINGS'; }
  </style>
  <style type="text/css">
   .d:before { content: "IGNORES UNCLOSED STRINGS"; }
   .d:before { content: "DOESN'T IGNORE UNCLOSED STRINGS
                        ; } /* "; } /* */
  </style>
  <style type="text/css">
   .e:before { content: "IGNORES UNCLOSED STRINGS"; }
   .e:before { content: "; content: 'TREATS UNCLOSED STRINGS AS UNKNOWN TOKENS, NOT STRINGS AT ALL'; } /*
             ; }
   .e:before { content: "TREATS UNCLOSED STRINGS AS STRINGS, NOT UNKNOWN TOKENS"; } /*
     "; } 
   .e:before { content: "SUPPORTS MULTILINE STRINGS"; } /*
     */
  </style>
 </head>
 <body>
  <pre>
Control: <span class="a"> </span>
  Test1: <span class="b"> </span>
  Test2: <span class="c"> </span>
  Test3: <span class="d"> </span>
  Test4: <span class="e"> </span>
  </pre>
 </body>
</html>
